<!--
	作者：leeeeyx@hotmail.com
	时间：2017-10-11
	描述：穿透报表
-->
<style>
	body{
		font-family: "微软雅黑";
	}
    		
</style>
<meta charset="UTF-8">
<div class="content-wrapper" style="min-height: 901px;">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      	<h1 style="text-align:center">
    		智能营业分析报告
      	</h1>
      	<br />
      	<div class="row">
	        <div class="col-md-4" >
				<h2 style="margin-top: 7px;text-align: right;font-size: 20px;">{{canteenName}}</h2>
	        </div>
	        <div class="col-md-4 has-feedback">
				<input type="text" class="form-control" id="datepicker" ng-model="searchDate" style="text-align: center;cursor:pointer" readonly="readonly">
				<span class="glyphicon glyphicon-calendar form-control-feedback" style="right: 15px;"></span>
	        </div>
	        <div class="col-md-4" style="margin-top: 7px;">
				<span style="color: #ec3700;" ng-if="exception_sum > 0"><i class="fa fa-warning"></i>今日有{{exception_sum}}项数据异常</span>
				<span style="color: #666;" ng-if="exception_sum <= 0"></i>今日无异常</span>
	        </div>
      	</div>
    </section>

    <!-- Main content -->
    <section class="content">
      	<div class="row">
	        <div class="col-md-12">
				<div class="box">
					<div class="box-header noprint">
				        <div class='col-md-4'  style="padding-top: 7px;">
							<span>{{searchDateRange}}</span>
						</div>
					    <div class="pull-right">
							<button class="btn btn-primary toggle" ng-click="toggleChart('0',$event)" data-name="relative">环比分析</button>
							<button class="btn btn-default toggle" ng-click="toggleChart('1',$event)" data-name="year_on_year">同比分析</button>
						</div>
			        </div>
			        <!-- 柱状图 -->
			        <div class="box-body" >
			        	<div id="chart" style="height:400px;" class="col-md-10 col-md-offset-1"></div>
			        </div>
			        <!-- 子表概览 -->
			        <div class="box-footer">
			        	<!-- 表一  -->
			        	<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">单品销售数据</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">{{item_sale_preview.exception_number}}</h4><h4 class="box-title">/{{item_sale_preview.total_number}}</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="#/itempreview">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	
				            	<div class="form-group row">
			                        <label for="inputEmail3" class="col-sm-3 control-label" style="text-align:right ;">菜销量(前三名):</label>
			                        <div class="col-sm-3" ng-repeat="p in item_sale_preview.popular_item track by $index">
                                       	 {{p.item_name}} &nbsp;{{p.sale_number}}份<span style="color: red;" ng-if="p.whether_exception">({{p.exception_value}})</span>
			                        </div>
                    			</div>  
                    			<div class="form-group row">
			                        <label for="inputEmail3" class="col-sm-3 control-label" style="text-align:right ;">菜销量(后三名):</label>
			                        <div class="col-sm-3" ng-repeat="u in item_sale_preview.unpopularity_item track by $index">
                                       	 {{u.item_name}} &nbsp;{{u.sale_number}}份<span style="color: red;" ng-if="u.whether_exception">({{u.exception_value}})</span>
			                        </div>
                    			</div>
                    			<div class="form-group row">
			                        <label for="inputEmail3" class="col-sm-3 control-label" style="text-align:right ;">毛利贡献(前三名):</label>
			                        <div class="col-sm-3" ng-repeat="b in item_sale_preview.best_profit_item track by $index">
                                       	 {{b.item_name}} &nbsp;{{b.profit}}元<span style="color: red;" ng-if="b.whether_exception">({{b.exception_value}})</span>
			                        </div>
                    			</div>
                    			<div class="form-group row">
			                        <label for="inputEmail3" class="col-sm-3 control-label" style="text-align:right ;">毛利贡献(后三名):</label>
			                        <div class="col-sm-3" ng-repeat="w in item_sale_preview.worst_profit_item track by $index">
                                       	 {{w.item_name}} &nbsp;{{w.profit}}元<span style="color: red;" ng-if="w.whether_exception">({{w.exception_value}})</span>
			                        </div>
                    			</div>
				            </div>
						</div>
						<!-- 表二  -->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">营业数据差异分析</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">0</h4><h4 class="box-title">/3</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="#/windowSaleAnalyze">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
			                        <label class="col-sm-4 control-label" style="text-align:left ;">
			                        	营业额:{{sale_number_profit.sale_money.number}}元
			                        	<span style="color: red;" ng-if="sale_number_profit.sale_money.whether_exception">({{sale_number_profit.sale_money.exception_value}})</span>
			                        </label>
                    			 	<label class="col-sm-4 control-label" style="text-align:left ;">
                    			 		毛利额:{{sale_number_profit.profit.number}}元
                    			 		<span style="color: red;" ng-if="sale_number_profit.profit.whether_exception">({{sale_number_profit.profit.exception_value}})</span>
                    			 	</label>
				            		<label class="col-sm-4 control-label" style="text-align:left ;">
				            			毛利率:{{sale_number_profit.profit_percent.number}}
				            			<span style="color: red;" ng-if="sale_number_profit.profit_percent.whether_exception">({{sale_number_profit.profit_percent.exception_value}})</span>
				            		</label>
				            	</div>  
				            </div>
						</div>
						<!-- 表三 -->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">卡务数据分析</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">0</h4><h4 class="box-title">/3</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
			                        <label class="col-sm-4 control-label" style="text-align:left ;">充值金额:25000元</label>
                    			 	<label class="col-sm-4 control-label" style="text-align:left ;">消费金额:20000元</label>
				            		<label class="col-sm-4 control-label" style="text-align:left ;">餐卡余额:15000元</label>
				            	</div>  
				            </div>
						</div>
						<!-- 表四-->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">评价数据</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">0</h4><h4 class="box-title">/3</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
			                        <label class="col-sm-4 control-label" style="text-align:left ;">综合评分:90分</label>
                    			 	<label class="col-sm-4 control-label" style="text-align:left ;">菜品差评:100</label>
				            		<label class="col-sm-4 control-label" style="text-align:left ;">菜品好评:800</label>
				            	</div>  
				            </div>
						</div>
						<!-- 表五-->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">剩菜管理</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">{{leftover.exception_number}}</h4><h4 class="box-title">/{{leftover.total_number}}</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
				            		<label class="col-sm-3 control-label" style="text-align:left ;">
				            			剩菜总量:{{leftover.total_ort_number.number}}份
				            			<span style="color: red;" ng-if="leftover.total_ort_number.whether_exception">
				            				({{leftover.total_ort_number.exception_value}})
				            			</span>
				            		</label>
			                        <label class="col-sm-2 control-label" style="text-align:left ;">剩菜率TOP3:</label>
                    			 	<label class="col-sm-2 control-label" style="text-align:left ;" ng-repeat="i in leftover.item_ort_number track by $index">
                    			 		{{i.item_name}}&nbsp;{{i.percent}}
                    			 		<span style="color: red;" ng-if="leftover.total_ort_number.whether_exception">
				            				({{i.number}})
				            			</span>
				            			<span ng-if="!leftover.total_ort_number.whether_exception">
				            				({{i.number}})
				            			</span>
                    			 	</label>
				            	</div>  
				            </div>
						</div>
						<!-- 表六-->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">消费数据统计</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">{{consumption.exception_number}}</h4><h4 class="box-title">/{{consumption.total_number}}</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
			                        <label class="col-sm-4 control-label" style="text-align:left ;">
			                        	总消费金额:{{consumption.consume_money.number}}元
			                        	<span style="color: red;" ng-if="consumption.consume_money.whether_exception">
				            				({{consumption.consume_money.exception_value}})
				            			</span>
			                        </label>
                    			 	<label class="col-sm-4 control-label" style="text-align:left ;">
                    			 		消费人次:{{consumption.consume_person_number.number}}元
			                        	<span style="color: red;" ng-if="consumption.consume_person_number.whether_exception">
				            				({{consumption.consume_person_number.exception_value}})
				            			</span>
                    			 	</label>
				            		<label class="col-sm-4 control-label" style="text-align:left ;">
				            			人均消费:{{consumption.avg_person_consume_money.number}}元
			                        	<span style="color: red;" ng-if="consumption.avg_person_consume_money.whether_exception">
				            				({{consumption.avg_person_consume_money.exception_value}})
				            			</span>
				            		</label>
				            	</div>  
				            </div>
						</div>
						<!-- 表七-->
						<div class="box box-default collapsed-box box-solid">
            				<div class="box-header with-border">
              					<h3 class="box-title">采购入库分析</h3>
              					<h4 class="box-title" style="padding-left: 50px;color: #ec0303;">0</h4><h4 class="box-title">/3</h4>
								<div class="box-tools pull-right">
									<a type="button" class="btn btn-box-tool" href="">
                  						查看更多
									</a>
				                	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
				                	</button>
				              	</div>
            				</div>
				            <div class="box-body">
				            	<div class="form-group row">
			                        <label class="col-sm-4 control-label" style="text-align:left ;">采购金额:15000元</label>
                    			 	<label class="col-sm-4 control-label" style="text-align:left ;">库存金额:5000元</label>
				            	</div>  
				            </div>
						</div>
			        </div>
				</div>
	        </div>
      	</div>
    </section>
    <!-- /.content -->
  </div>
